105 PRINT : HTAB 5: PRINT "WHEN WE SPEAK OF INTERACTIVE PRO-": PRINT : PRINT "GRAMMING, WE ARE TALKING ABOUT A SYSTEM"
110 PRINT : PRINT "WHICH ALLOWS THE OPERATOR TO DIRECT THE": PRINT : PRINT "FLOW OF PROGRAM CONTROL. IT HAS THREE"
115 PRINT : PRINT "MAIN ELEMENTS; PROMPTS WHICH GIVE IN-": PRINT : PRINT "STRUCTIONS; INPUT COMMANDS WHICH ACCEPT"
120 PRINT : PRINT "THE OPERATOR'S DIRECTIONS OR DATA; AND": PRINT : PRINT "ERROR CHECKING ROUTINES WHICH PREVENT": PRINT : PRINT "THE ENTERING OF UNWANTED DATA."
199 GOTO 6
200 X$ = "PROMPTS": GOSUB 20: HTAB 5: PRINT "PROMPTS ARE REALLY JUST INSTRUC-"
205 PRINT : PRINT "TIONS PROVIDED BY A PROGRAMMER TO HELP": PRINT : PRINT "THE OPERATOR UNDERSTAND WHAT TO DO."
210 PRINT : PRINT "WHENEVER YOU WRITE A PROGRAM, BE SURE": PRINT : PRINT "TO GIVE CLEAR, CONCISE DIRECTIONS. IF": PRINT : PRINT "YOU EXPECT AN OPERATOR TO ENTER NUMBERS"
215 PRINT : PRINT "FOR YOUR PROGRAM, SAY SO. IF YOU WANT": PRINT : PRINT "A YES OR NO, SAY SO. ";
220 PRINT NAME$", YOU": PRINT : PRINT "WILL SOON SEE HOW TO PUT PROMPTS ON": PRINT : PRINT "THE SCREEN."
299 GOTO 6
300 X$ = "THE INPUT STATEMENT": GOSUB 20
305 HTAB 5: PRINT NAME$", YOU USE AN INPUT STATE-": PRINT : PRINT "MENT WHEN YOU WANT SOME INFORMATION"
310 PRINT : PRINT "OR DATA ENTERED DURING THE RUNNING OF": PRINT : PRINT "A PROGRAM. AS YOU RUN THESE LESSONS,": PRINT : PRINT "INPUT STATEMENTS ARE USED TO STOP THE"
315 PRINT : PRINT "PROGRAM AND ALLOW YOU TO ENTER INFOR-": PRINT : PRINT "MATION INTO THE COMPUTER. EACH TIME,": PRINT : PRINT "THE COMPUTER HAS STOPPED AND WAITED": PRINT : PRINT "FOR YOU."
399 GOTO 6
400 GOSUB 20: HTAB 5: PRINT "AS AN ADDED CONVENIENCE, YOU CAN": PRINT : PRINT "ALSO INSERT SOME TEXT IN QUOTES WITH": PRINT : PRINT "THE INPUT STATEMENT. FOR EXAMPLE:"
405 PRINT : PRINT : HTAB 6: PRINT "100 INPUT "Q$"ENTER YOUR VALUE"Q$";A": PRINT : PRINT : HTAB 5: PRINT "USING PROMPTS IN QUOTES WITH INPUT": PRINT : PRINT "GIVES YOU A CHANCE TO HELP THE"
410 PRINT : PRINT "THE OPERATOR PUT IN CORRECT DATA."
430 PRINT "110 WAGES = (HOURS * PAY) * .75": PRINT "120 PRINT "Q$"WAGES ARE "Q$";WAGES": PRINT "130 END": PRINT : HTAB 5: PRINT "THIS SIMPLIFIED PAYROLL CALCULATION": PRINT "ASSUMES A 25% TAX AND FIGURES WAGES": PRINT "AS 75% OF THE PAY."
435 GOTO 6
440 X$ = "THE INPUT STATEMENT": GOSUB 20: HTAB 5: PRINT "THIS TECHNIQUE USES FEWER LINES": PRINT : PRINT "AND STILL LETS YOU GIVE PROMPTS. NOTE": PRINT : PRINT "THE SEMICOLON AFTER THE QUOTES WITH"
445 PRINT : PRINT "THE INPUT COMMAND.": PRINT : PRINT : PRINT "100 INPUT"Q$"ENTER YOUR AMOUNTS"Q$";HOURS,PAY": PRINT : PRINT : HTAB 5: PRINT "WHENEVER YOU COMBINE A MESSAGE WITH"
448 PRINT : PRINT "AN INPUT COMMAND, YOU MUST USE A SEMI-": PRINT : PRINT "COLON TO SEPARATE THE MESSAGE AND THE": PRINT : PRINT "VARIABLE NAME.": GOTO 6
450 HOME : PRINT : HTAB 5: PRINT "NOW, "NAME$", TYPE RUN TO": PRINT : PRINT "USE THIS LAST PROGRAM. YOU WILL BE": PRINT : PRINT "ASKED FOR TWO VALUES, THE FIRST FOR"
455 PRINT : PRINT "HOURS AND THE SECOND FOR PAY. TYPE A": PRINT : PRINT "COMMA BETWEEN THEM AND DON'T FORGET": PRINT : PRINT "THE RETURN KEY. WAGES WILL BE COMPUTED": PRINT : PRINT "FOR YOU.": PRINT : PRINT "TYPE RUN AND PRESS RETURN ";
465 PRINT : INPUT "DID IT WORK? ";R$: IF LEFT$(R$,1) = "Y" THEN 486
470 X$ = "REVIEW": GOSUB 20: HTAB 5: PRINT "IT SHOULD HAVE WORKED. LET'S CHECK": PRINT : PRINT "YOUR CALCULATIONS. YOU ENTERED "HOURS
475 PRINT : PRINT "FOR HOURS AND "PAY" FOR PAY. IF WE": PRINT : PRINT "WORK OUT THE FORMULA, WE GET:": PRINT : PRINT "WAGES = ("HOURS"*"PAY") * .75, OR"
485 PRINT : PRINT "VALUES YOU ENTERED. WOULD YOU LIKE TO": PRINT : PRINT "GO BACK AND TRY AGAIN? ";: INPUT "";R$: IF LEFT$(R$,1) = "Y" THEN 460
486 IF Q1 = 1 THEN 499
487 Q1 = 1:X$ = "QUIZ QUESTION": GOSUB 20: VTAB 6: HTAB 5: PRINT "CHOOSE THE PROGRAM LINE WHICH IS CORRECTLY WRITTEN.": PRINT : PRINT "A) 100 INPUT "Q$"ENTER YOUR NAME"Q$"; NAME$"
488 PRINT : HTAB 20: PRINT "OR": PRINT : PRINT "B) 100 INPUT "Q$"ENTER YOUR NAME"Q$" NAME$": PRINT : INPUT "WHICH ONE? ";R$: IF LEFT$(R$,1) = "A" THEN NC = NC +1: GOTO 495
490 PRINT : PRINT "NO, THAT'S NOT A GOOD CHOICE. IF YOU WILL LOOK AT BOTH ITEMS AGAIN,": PRINT "YOU SHOULD NOTICE THAT B) DOES NOT HAVE A SEMI-COLON BETWEEN THE QUOTES AND THE VARIABLE NAME."
492 GOTO 499
495 PRINT : PRINT "YES, THAT'S RIGHT."
499 GOTO 6
500 X$ = "REVIEW": GOSUB 20: HTAB 5: PRINT "IT'S REALLY FAIRLY EASY, "NAME$".": PRINT : PRINT "WHEN THE COMPUTER NEEDS SOME DATA TO": PRINT : PRINT "COMPLETE THE RUNNING OF A PROGRAM, USE"
505 PRINT : PRINT "AN INPUT COMMAND TO LET THE COMPUTER": PRINT : PRINT "AND THE OPERATOR INTERACT WITH EACH": PRINT : PRINT "OTHER. THIS INTERACTION IS THE SOURCE"
510 PRINT : PRINT "OF THE NAME "Q$"INTERACTIVE PROGRAMMING"Q$".": PRINT : HTAB 5: PRINT "AT THIS POINT, YOU SHOULD BE READY": PRINT : PRINT "TO MOVE ON TO THE THIRD ELEMENT OF"
623 PRINT : PRINT "WHENEVER YOU USE AN INPUT IN YOUR PRO-": PRINT : PRINT "GRAM, YOU SHOULD TRY TO PROTECT THE": PRINT : PRINT "OPERATOR FROM ERRORS DURING INPUT."
626 PRINT : PRINT "ONE WAY TO DO THIS IS TO CHECK FOR": PRINT : PRINT "SPECIFIC RESPONSES. THE IF...THEN": PRINT : PRINT "STATEMENT WILL HELP YOU, "NAME$"."
650 PRINT : PRINT "LINE 220 CHECKS FOR "Q$"YES"Q$"; 230 CHECKS": PRINT "FOR A BLANK. YOU MIGHT WANT TO COPY": PRINT "THIS EXAMPLE."
653 GOTO 6
656 X$ = "ERROR CHECKING": GOSUB 20: PRINT : HTAB 5: PRINT "LOOK AT WHAT YOU HAVE COPIED.": PRINT : PRINT "IF THE PROGRAM FINDS NEITHER A YES": PRINT : PRINT "NOR A BLANK, IT CONTINUES WITH THE"
659 PRINT : PRINT "NEXT PROGRAM LINES. WHAT HAPPENS": PRINT : PRINT "WHEN THE RESPONSE IS BLANK? HOW DOES"
662 PRINT : PRINT "IT REACT TO A "Q$"YES"Q$"?": PRINT : HTAB 5: PRINT "THE IF...THEN COMMAND IS VERY": PRINT : PRINT "POWERFUL."
665 GOTO 6
668 X$ = "ERROR CHECKING": GOSUB 20: HTAB 5: PRINT "WHENEVER THE TEST IS TRUE, IT": PRINT : PRINT "PERFORMS THE COMMANDS WHICH FOLLOW."
674 PRINT : PRINT "THIS PROGRAM WILL GOTO 800 ONLY WHEN": PRINT : PRINT "R$ ="Q$"Y"Q$". IN ALL OTHER CASES THE IN-"
677 PRINT : PRINT "STRUCTIONS AFTER ";: INVERSE : PRINT "THEN";: NORMAL : PRINT " ARE IGNORED."
680 PRINT : PRINT "YOU SHOULD PLAN TO USE THIS COMMAND": PRINT : PRINT "IN YOUR NEXT PROGRAM. NOW WE WILL LOOK": PRINT : PRINT "AT SOME OTHER USEFUL FEATURES OF BASIC."
682 IF Q2 = 2 THEN 690
683 VTAB 24: INPUT "PRESS RETURN ";R$
684 Q2 = 2:X$ = "QUIZ QUESTION": GOSUB 20: VTAB 6: HTAB 5: PRINT "READ BOTH OF THESE PROGRAM LINES": PRINT : PRINT " 10 IF A = 1 THEN PRINT "Q$"THAT'S RIGHT"Q$" :GOTO 1000"
686 PRINT : HTAB 10: PRINT "IF A = 2 WHAT WILL BE PRINTED ON THE SCREEN?": PRINT : HTAB 12: PRINT "A) THAT'S RIGHT": PRINT : HTAB 12: PRINT "B) SORRY, TRY AGAIN": PRINT : HTAB 12: INPUT R$
687 IF LEFT$(R$,1) = "B" THEN PRINT "THAT'S CORRECT. KEEP UP THE GOOD WORK.":NC = NC +1: GOTO 690
688 POKE 34,13: HOME : PRINT "NO, THE MESSAGE IN LINE 10 WOULD PRINT ONLY IF THE TEST, DOES A = 1?, WERE FOUND TO BE TRUE.": PRINT : PRINT "WHEN A TEST PROVES FALSE, BASIC STOPS READING THE LINE AND GOES TO THE NEXT ONE."
689 TEXT
690 GOTO 6
700 X$ = "THE COLON": GOSUB 20
705 VTAB 5: HTAB 5: PRINT "WHEN YOU USE INPUT, PRINT, OR END,": PRINT : PRINT "YOU ARE WRITING BASIC STATEMENTS. THE": PRINT : PRINT "APPLE ALLOWS YOU TO HAVE MORE THAN ONE"
710 PRINT : PRINT "STATEMENT PER LINE. HOWEVER, WHEN YOU": PRINT : PRINT "USE MORE THAN ONE, YOU ARE REQUIRED": PRINT : PRINT "TO SEPARATE THEM WITH COLONS.": GOTO 6
715 X$ = "THE COLON": GOSUB 20: HTAB 2: PRINT "FOR EXAMPLE:": PRINT : HTAB 5: PRINT "100 INPUT PRICE : TAX = PRICE * .06": HTAB 5: PRINT "105 REM THIS FINDS THE SALES TAX":
720 HTAB 5: PRINT "110 C = PRICE + TAX : REM C = TOTAL COST"
730 PRINT : PRINT "LOOK AT LINE 120. WHAT DO YOU THINK": PRINT : PRINT "IT DOES?": PRINT : HTAB 5: PRINT "NOTICE THAT TWO OF THE COMMANDS": PRINT : PRINT "CONTAIN THE WORD TAB. WHAT MIGHT THE": PRINT : PRINT "V OR H INDICATE?"
735 GOTO 6
738 X$ = "SCREEN FORMATTING": GOSUB 20
740 VTAB 5: HTAB 5: PRINT "IT'S IMPORTANT TO DESIGN YOUR TEXT": PRINT : PRINT "LAYOUT CAREFULLY TO HELP THE OPERATOR": PRINT : PRINT "INTERACT WITH YOUR PROGRAM IN THE WAY"
745 PRINT : PRINT "YOU INTENDED. CLUTTERED, CONFUSING DIS-": PRINT : PRINT "PLAYS DON'T PRESENT CLEAR INSTRUCTIONS.": PRINT : HTAB 5: PRINT "HOME, VTAB, AND HTAB CAN HELP YOU"
750 PRINT : PRINT "TO KEEP YOUR SCREENS NEAT, "NAME$".": PRINT : PRINT "TRY TO USE THEM CORRECTLY."
752 GOTO 6
754 GOSUB 20: HTAB 5: PRINT "HOME CAN BE PLACED IN YOUR PROGRAM"
755 PRINT : PRINT "TO CLEAR UNWANTED TEXT OFF OF THE": PRINT : PRINT "SCREEN WHENEVER NECESSARY. USING HOME": PRINT : PRINT "IS LIKE ERASING A BLACKBOARD OR GETTING": PRINT : PRINT "A CLEAN SHEET OF PAPER."
758 PRINT : HTAB 5: PRINT "AFTER YOUR PROGRAM EXECUTES THE": PRINT : PRINT "HOME COMMAND, THE CURSOR WILL ALWAYS"
760 PRINT : PRINT "BE AT THE TOP LEFT CORNER OF YOUR": PRINT : PRINT "SCREEN.": GOTO 6
765 X$ = "SCREEN FORMATTING": GOSUB 20: HTAB 4: PRINT "VTAB AND HTAB ARE VERY USEFUL TOOLS.": PRINT : PRINT "YOU CAN USE THEM TO POSITION THE ": PRINT : PRINT "CURSOR EXACTLY WHERE YOU WANT IT. VTAB"
770 PRINT : PRINT "DIRECTS THE POSITIONING OF THE CURSOR": PRINT : PRINT "VERTICALLY. VTAB IS SHORT FOR VERTICAL": PRINT : PRINT "TAB. YOU CAN SET VTAB AT ANY VALUE"
775 PRINT : PRINT "FROM 1 TO 24. VTAB 1 IS THE TOP LINE;": PRINT : PRINT "AND VTAB 24 IS THE BOTTOM LINE."
795 REM
797 IF Q3 = 3 THEN 820
798 VTAB 24: INPUT "PRESS RETURN ";R$
800 Q3 = 3:X$ = "QUIZ QUESTION": GOSUB 20: HTAB 5: PRINT "BY NOW, "NAME$", YOU SHOULD": PRINT : PRINT "HAVE GUESSED WHAT HTAB IS USED FOR."
802 PRINT : PRINT "WHAT DO YOU THINK THAT THE H MEANS?": PRINT : HTAB 10: INPUT "TAKE A GUESS ";R$
805 IF LEFT$(R$,3) = "HOR" THEN NC = NC +1: PRINT : PRINT "THAT'S RIGHT. I KNEW YOU'D GET IT."
808 IF LEFT$(R$,3) < >"HOR" THEN PRINT : PRINT "SORRY."
810 PRINT : HTAB 5: PRINT "HTAB STANDS FOR HORIZONTAL TAB.": PRINT : PRINT "YOU USE IT TO INDENT YOUR TEXT. THE": PRINT : PRINT "BEGINNING OF THIS PARAGRAPH IS AN"
815 PRINT : PRINT "EXAMPLE. HTAB CAN HAVE VALUES FROM 1": PRINT : PRINT "TO 40. YOUR SCREEN HAPPENS TO BE 40": PRINT : PRINT "CHARACTERS WIDE.": INPUT "PRESS RETURN ";R$
816 HOME : GOSUB 20: VTAB 5: PRINT "180 VTAB 10 : PRINT "Q$"THIS IS REVIEW."Q$: PRINT : HTAB 5: PRINT "THIS LINE WILL TAB ACROSS 10 SPACES": PRINT : HTAB 10: INPUT "TRUE OR FALSE ";R$: IF LEFT$(R$,1) = "T" THEN PRINT "SORRY."
817 PRINT : PRINT "VTAB STANDS FOR VERTICAL TAB. IT MOVES DOWN THE NUMBER OF LINES STATED.": IF LEFT$(R$,1) = "F" THEN NC = NC +1
818 IF LEFT$(R$,1) = "F" THEN PRINT : PRINT "YOU GOT THIS ONE RIGHT!"
820 GOTO 6
900 X$ = "INTERACTIVE ASSIGNMENT": GOSUB 20
905 PRINT : HTAB 5: PRINT "WRITE A PROGRAM WHICH USES PROMPTS,": PRINT : PRINT "ERROR CHECKING, AND INPUT ROUTINES."
910 PRINT : HTAB 7: PRINT "1) ASK FOR THE DATE USING THE INPUT COMMAND AND QUOTES."
915 PRINT : HTAB 7: PRINT "2) ASK FOR AN EMPLOYEE'S NAME AND ADDRESS.": PRINT : HTAB 7: PRINT "3) CLEAR THE SCREEN AND PRINT THE NAME AND ADDRESS WITH LABELS."
920 PRINT : HTAB 7: PRINT "4) USE IF..THEN TO DETERMINE IF THE OPERATOR HAS MORE NAMES. ACT ON THE RESPONSE.
925 GOTO 6
930 GOSUB 20: HTAB 5: PRINT "YOU WILL HAVE TO DECIDE WHAT": PRINT : PRINT "YOUR PROGRAM'S REACTION TO THE THE": PRINT : PRINT "OPERATOR'S RESPONSE SHOULD BE. MORE"
935 PRINT : PRINT "THAN LIKELY, YOU WILL WANT TO SET UP": PRINT : PRINT "A LOOP WHICH LETS THE OPERATOR ENTER": PRINT : PRINT "MORE NAMES AND ADDRESSES."
940 PRINT : HTAB 5: PRINT "TRY TO SET UP YOUR SCREEN SO THAT": PRINT : PRINT "IT IS NEATLY ARRANGED AND EASY TO READ.": PRINT : PRINT "DON'T FORGET ABOUT VTAB AND HTAB."
1052 PRINT : HTAB 5: PRINT "DURING THIS LESSON, YOU WERE ASKED": PRINT : PRINT "FOUR QUESTIONS, "NAME$". YOU "
1054 PRINT : PRINT "ANSWERED "NC" CORRECTLY. THIS GIVES": PRINT : PRINT "A SCORE OF "SC" PERCENT."
1056 PRINT : HTAB 5: PRINT "HOW DO YOU THINK YOU'RE DOING?": PRINT : IF SC >90 THEN PRINT "I THINK YOU DESERVE AN AWARD."
1058 IF SC >74 AND SC <91 THEN PRINT : PRINT "I THINK YOU ARE LEARNING QUICKLY."
1060 IF SC >59 AND SC <75 THEN PRINT : PRINT "I SUGGEST YOU DO SOME REVIEW?"
1062 IF SC <50 THEN PRINT : PRINT "YOU SHOULD PROBABLY DO THIS LESSON ": PRINT : PRINT "AGAIN, "NAME$"."
1070 GOTO 6
1080 HOME : VTAB 5: PRINT "THIS IS THE END OF THIS LESSON. YOU": PRINT : PRINT "MAY GO BACK AND REVIEW USING THE LEFT": PRINT : PRINT "ARROW. USING THE RIGHT ARROW WILL"
1082 PRINT : PRINT "TAKE YOU BACK TO THE TITLE PROGRAM ": PRINT : PRINT "WHERE YOU CAN CHOOSE ONE OF THE DEMON-": PRINT : PRINT "STRATIONS."
1084 GOTO 6
1100 FLAG = 1: GOSUB 40000: VTAB 8: HTAB 6: PRINT "GOOD BYE, "NAME$: FOR COUNT = 1 TO 300: NEXT : TEXT : HOME : PRINT D$"RUN HELLO"
39999 STOP
40000 TEXT : HOME : HTAB 15: INVERSE : PRINT ":DANDELION:": FOR X = 0 TO 35: PRINT " ";: NEXT
40010 FOR X = 2 TO 22: VTAB X: PRINT " ";: HTAB 37: PRINT " ": NEXT
40020 FOR X = 0 TO 37: PRINT " ";: NEXT
40030 POKE 33,30: POKE 32,4: POKE 34,3: POKE 35,22: NORMAL : HOME